//
// Created by root on 10/26/18.
//

#ifndef URSAX_DEBUG_H
#define URSAX_DEBUG_H


#include <stdint.h>


#ifdef __cplusplus
extern "C" {
#endif

void wrap_print_call_stack(bool *in_print_call_stack);
int print_call_stack();
int st_print_call_stack(void *st_thread);
char* get_thread_magics();

void START_RECORD();
void END_RECORD();

int debug_reference(int ref);
void PUSH_THREAD_ADDR(uint32_t ip, uint16_t port);
void PUSH_THREAD_CHUNK_ID(uint32_t volumeid, uint32_t index);
void POP_THREAD_MAGIC();

void init_debug_thread();
void fini_debug_thread();
void show_dead_thread();

#ifdef __cplusplus
}
#endif

#endif //URSAX_DEBUG_H
